﻿<Window x:Class="TimeZoneConverter.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Time zone converter" SizeToContent="WidthAndHeight" ResizeMode="CanMinimize">
    <Window.Resources>
        <Style x:Key="timeTextBox" TargetType="{x:Type TextBox}">
            <Setter Property="Margin" Value="3"/>
            <Setter Property="FontSize" Value="18"/>
            <Setter Property="Width" Value="100"/>
            <Setter Property="TextAlignment" Value="Center"/>
        </Style>
    </Window.Resources>
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Column="1" HorizontalAlignment="Center" Margin="5" FontSize="19">Convert time zone</TextBlock>

        <GroupBox Grid.Row="1" Header="Source">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="110"/>
                </Grid.ColumnDefinitions>
                
                <TextBlock>Time zone:</TextBlock>
                <ComboBox Grid.Row="1" x:Name="srcTimeZone" VerticalAlignment="Center"/>

                <TextBlock Grid.Column="1">Time:</TextBlock>
                <TextBox Grid.Row="1" Grid.Column="1" x:Name="srcTime" Style="{StaticResource timeTextBox}"/>

                <CheckBox Grid.Row="1" Grid.Column="2" x:Name="useCurrentTime" Content="use local current" VerticalAlignment="Center"/>
            </Grid>    
        </GroupBox>

        <GroupBox Grid.Row="2" Header="Target">
            <Grid Margin="0,0,110,0">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>

                <TextBlock>Time zone:</TextBlock>
                <ComboBox Grid.Row="1" x:Name="targetTimeZone" VerticalAlignment="Center"/>

                <TextBlock Grid.Column="1">Time:</TextBlock>
                <TextBox Grid.Row="1" Grid.Column="1" x:Name="targetTime" Style="{StaticResource timeTextBox}" IsReadOnly="True"/>
            </Grid>
        </GroupBox>
    </Grid>
</Window>
